package com.sweet.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "sweet-provider-pay-hystrix-8008", fallback = FallbackDealImpl.class)
@Component
public interface IOrderService {

    @GetMapping("/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/timeout/{id}/{time}")
    public String paymentInfo_TimeOut(@PathVariable("id") Integer id,
                                      @PathVariable("time") Integer time);

    @GetMapping("/payment/hystrix/error/{id}")
    public String paymentInfo_Error(@PathVariable("id") Integer id);
}
